package com.happyclub.pojo;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

/**
 * @author 高欢
 * @description TODO
 * @date 2019/4/7
 */
@Entity
@Table(name = "TB_ACTIVITY", schema = "SCOTT")
@EntityListeners(AuditingEntityListener.class)
public class TbActivity {
    private String id;
    private String activityTypeId;
    private String userId;
    private String issueType;
    private String iemi;
    private String ip;
    private String activityLocation;
    private Long isCharge;
    private String insuranceChannel;
    private String chargeMode;
    private String activityDetail;
    private Long activityIshot;
    private Date activityEndTime;
    private Date activityBeginTime;
    private Integer activityMaxPeople;
    private Integer activityViewCount;
    private Long ok;
    private Date updateTime;
    private Date createTime;
    private Date activityExpiredTime;
    private String chargeModechargeMode;
    private String activityBeginLocation;
    private String activityCover;
    private String activityTitle;

    @Id
    @Column(name = "ID")
    @GenericGenerator(name="idGenerator", strategy="uuid") //这个是hibernate的注解/生成32位UUID
    @GeneratedValue(generator="idGenerator")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ACTIVITY_TYPE_ID")
    public String getActivityTypeId() {
        return activityTypeId;
    }

    public void setActivityTypeId(String activityTypeId) {
        this.activityTypeId = activityTypeId;
    }

    @Basic
    @Column(name = "USER_ID")
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "ISSUE_TYPE")
    public String getIssueType() {
        return issueType;
    }

    public void setIssueType(String issueType) {
        this.issueType = issueType;
    }

    @Basic
    @Column(name = "IEMI")
    public String getIemi() {
        return iemi;
    }

    public void setIemi(String iemi) {
        this.iemi = iemi;
    }

    @Basic
    @Column(name = "IP")
    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    @Basic
    @Column(name = "ACTIVITY_LOCATION")
    public String getActivityLocation() {
        return activityLocation;
    }

    public void setActivityLocation(String activityLocation) {
        this.activityLocation = activityLocation;
    }

    @Basic
    @Column(name = "IS_CHARGE")
    public Long getIsCharge() {
        return isCharge;
    }

    public void setIsCharge(Long isCharge) {
        this.isCharge = isCharge;
    }

    @Basic
    @Column(name = "INSURANCE_CHANNEL")
    public String getInsuranceChannel() {
        return insuranceChannel;
    }

    public void setInsuranceChannel(String insuranceChannel) {
        this.insuranceChannel = insuranceChannel;
    }

    @Basic
    @Column(name = "CHARGE_MODE")
    public String getChargeMode() {
        return chargeMode;
    }

    public void setChargeMode(String chargeMode) {
        this.chargeMode = chargeMode;
    }

    @Basic
    @Column(name = "ACTIVITY_DETAIL")
    public String getActivityDetail() {
        return activityDetail;
    }

    public void setActivityDetail(String activityDetail) {
        this.activityDetail = activityDetail;
    }

    @Basic
    @Column(name = "ACTIVITY_ISHOT")
    public Long getActivityIshot() {
        return activityIshot;
    }

    public void setActivityIshot(Long activityIshot) {
        this.activityIshot = activityIshot;
    }

    @Basic
    @Column(name = "ACTIVITY_END_TIME")
    public Date getActivityEndTime() {
        return activityEndTime;
    }

    public void setActivityEndTime(Date activityEndTime) {
        this.activityEndTime = activityEndTime;
    }

    @Basic
    @Column(name = "ACTIVITY_BEGIN_TIME")
    public Date getActivityBeginTime() {
        return activityBeginTime;
    }

    public void setActivityBeginTime(Date activityBeginTime) {
        this.activityBeginTime = activityBeginTime;
    }

    @Basic
    @Column(name = "ACTIVITY_MAX_PEOPLE")
    public Integer getActivityMaxPeople() {
        return activityMaxPeople;
    }

    public void setActivityMaxPeople(Integer activityMaxPeople) {
        this.activityMaxPeople = activityMaxPeople;
    }

    @Basic
    @Column(name = "ACTIVITY_VIEW_COUNT")
    public Integer getActivityViewCount() {
        return activityViewCount;
    }

    public void setActivityViewCount(Integer activityViewCount) {
        this.activityViewCount = activityViewCount;
    }

    @Basic
    @Column(name = "OK")
    public Long getOk() {
        return ok;
    }

    public void setOk(Long ok) {
        this.ok = ok;
    }

    @Basic
    @Column(name = "UPDATE_TIME")
    @LastModifiedDate
    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    @CreatedDate
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Basic
    @Column(name = "ACTIVITY_EXPIRED_TIME")
    public Date getActivityExpiredTime() {
        return activityExpiredTime;
    }

    public void setActivityExpiredTime(Date activityExpiredTime) {
        this.activityExpiredTime = activityExpiredTime;
    }

    @Basic
    @Column(name = "CHARGE_MODECHARGE_MODE")
    public String getChargeModechargeMode() {
        return chargeModechargeMode;
    }

    public void setChargeModechargeMode(String chargeModechargeMode) {
        this.chargeModechargeMode = chargeModechargeMode;
    }

    @Basic
    @Column(name = "ACTIVITY_BEGIN_LOCATION")
    public String getActivityBeginLocation() {
        return activityBeginLocation;
    }

    public void setActivityBeginLocation(String activityBeginLocation) {
        this.activityBeginLocation = activityBeginLocation;
    }

    @Basic
    @Column(name = "ACTIVITY_COVER")
    public String getActivityCover() {
        return activityCover;
    }

    public void setActivityCover(String activityCover) {
        this.activityCover = activityCover;
    }

    @Basic
    @Column(name = "ACTIVITY_TITLE")
    public String getActivityTitle() {
        return activityTitle;
    }

    public void setActivityTitle(String activityTitle) {
        this.activityTitle = activityTitle;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TbActivity that = (TbActivity) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(activityTypeId, that.activityTypeId) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(issueType, that.issueType) &&
                Objects.equals(iemi, that.iemi) &&
                Objects.equals(ip, that.ip) &&
                Objects.equals(activityLocation, that.activityLocation) &&
                Objects.equals(isCharge, that.isCharge) &&
                Objects.equals(insuranceChannel, that.insuranceChannel) &&
                Objects.equals(chargeMode, that.chargeMode) &&
                Objects.equals(activityDetail, that.activityDetail) &&
                Objects.equals(activityIshot, that.activityIshot) &&
                Objects.equals(activityEndTime, that.activityEndTime) &&
                Objects.equals(activityBeginTime, that.activityBeginTime) &&
                Objects.equals(activityMaxPeople, that.activityMaxPeople) &&
                Objects.equals(activityViewCount, that.activityViewCount) &&
                Objects.equals(ok, that.ok) &&
                Objects.equals(updateTime, that.updateTime) &&
                Objects.equals(createTime, that.createTime) &&
                Objects.equals(activityExpiredTime, that.activityExpiredTime) &&
                Objects.equals(chargeModechargeMode, that.chargeModechargeMode) &&
                Objects.equals(activityBeginLocation, that.activityBeginLocation) &&
                Objects.equals(activityCover, that.activityCover) &&
                Objects.equals(activityTitle, that.activityTitle);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, activityTypeId, userId, issueType, iemi, ip, activityLocation, isCharge, insuranceChannel, chargeMode, activityDetail, activityIshot, activityEndTime, activityBeginTime, activityMaxPeople, activityViewCount, ok, updateTime, createTime, activityExpiredTime, chargeModechargeMode, activityBeginLocation, activityCover, activityTitle);
    }
}
